#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
void func(num)
{
	if (num == 0)
		return;
	int a = num % 10;
	printf("%d ", a);
	func(num / 10);
}
int main()
{
	int num = 0;
	scanf("%d", &num);
	func(num);
	return 0;
}